From 16677bb85ad78ac57776a679abaa69e3d1fc22b9 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 26 Oct 2012 23:33:40 +0200 Subject: [PATCH] stylecontext: Don't use bg image in gtk_style_context_set_background() Old code tried to use the "background-image" proeprty for setting the default image background. While this used to work in the early days of GTK3, today it is grossly misleading as the backgronud image may be resized, repositioned and semi-translucent which causes very weird artifacts when rendering. So we use the background-color only instead. --- gtk/gtkstylecontext.c | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c index a6b7369b34..a139d39243 100644 --- a/gtk/gtkstylecontext.c +++ b/gtk/gtkstylecontext.c @@ -3264,22 +3264,12 @@ gtk_style_context_set_background (GtkStyleContext *context, GdkWindow *window) { GtkStateFlags state; - cairo_pattern_t *pattern; GdkRGBA *color; g_return_if_fail (GTK_IS_STYLE_CONTEXT (context)); g_return_if_fail (GDK_IS_WINDOW (window)); state = gtk_style_context_get_state (context); - gtk_style_context_get (context, state, - "background-image", &pattern, - NULL); - if (pattern) - { - gdk_window_set_background_pattern (window, pattern); - cairo_pattern_destroy (pattern); - return; - } gtk_style_context_get (context, state, "background-color", &color, -- 2.30.2